// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file HandMessage.cpp
 * This source file contains the implementation of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifdef _WIN32
// Remove linker warning LNK4221 on Visual Studio
namespace {
char dummy;
}  // namespace
#endif  // _WIN32

#include "HandMessage.h"

#include <fastcdr/Cdr.h>


#include <fastcdr/exceptions/BadParamException.h>
using namespace eprosima::fastcdr::exception;

#include <utility>




HandMessage::HandMessage()
{
}

HandMessage::~HandMessage()
{
}

HandMessage::HandMessage(
        const HandMessage& x)
{
    m_timestamp = x.m_timestamp;
    m_det_valid = x.m_det_valid;
    m_warning = x.m_warning;
    m_joints_l = x.m_joints_l;
    m_joints3d_l = x.m_joints3d_l;
    m_verts3d_l = x.m_verts3d_l;
    m_joints_r = x.m_joints_r;
    m_joints3d_r = x.m_joints3d_r;
    m_verts3d_r = x.m_verts3d_r;
}

HandMessage::HandMessage(
        HandMessage&& x) noexcept
{
    m_timestamp = std::move(x.m_timestamp);
    m_det_valid = std::move(x.m_det_valid);
    m_warning = std::move(x.m_warning);
    m_joints_l = std::move(x.m_joints_l);
    m_joints3d_l = std::move(x.m_joints3d_l);
    m_verts3d_l = std::move(x.m_verts3d_l);
    m_joints_r = std::move(x.m_joints_r);
    m_joints3d_r = std::move(x.m_joints3d_r);
    m_verts3d_r = std::move(x.m_verts3d_r);
}

HandMessage& HandMessage::operator =(
        const HandMessage& x)
{

    m_timestamp = x.m_timestamp;
    m_det_valid = x.m_det_valid;
    m_warning = x.m_warning;
    m_joints_l = x.m_joints_l;
    m_joints3d_l = x.m_joints3d_l;
    m_verts3d_l = x.m_verts3d_l;
    m_joints_r = x.m_joints_r;
    m_joints3d_r = x.m_joints3d_r;
    m_verts3d_r = x.m_verts3d_r;
    return *this;
}

HandMessage& HandMessage::operator =(
        HandMessage&& x) noexcept
{

    m_timestamp = std::move(x.m_timestamp);
    m_det_valid = std::move(x.m_det_valid);
    m_warning = std::move(x.m_warning);
    m_joints_l = std::move(x.m_joints_l);
    m_joints3d_l = std::move(x.m_joints3d_l);
    m_verts3d_l = std::move(x.m_verts3d_l);
    m_joints_r = std::move(x.m_joints_r);
    m_joints3d_r = std::move(x.m_joints3d_r);
    m_verts3d_r = std::move(x.m_verts3d_r);
    return *this;
}

bool HandMessage::operator ==(
        const HandMessage& x) const
{
    return (m_timestamp == x.m_timestamp &&
           m_det_valid == x.m_det_valid &&
           m_warning == x.m_warning &&
           m_joints_l == x.m_joints_l &&
           m_joints3d_l == x.m_joints3d_l &&
           m_verts3d_l == x.m_verts3d_l &&
           m_joints_r == x.m_joints_r &&
           m_joints3d_r == x.m_joints3d_r &&
           m_verts3d_r == x.m_verts3d_r);
}

bool HandMessage::operator !=(
        const HandMessage& x) const
{
    return !(*this == x);
}

/*!
 * @brief This function copies the value in member timestamp
 * @param _timestamp New value to be copied in member timestamp
 */
void HandMessage::timestamp(
        const std::string& _timestamp)
{
    m_timestamp = _timestamp;
}

/*!
 * @brief This function moves the value in member timestamp
 * @param _timestamp New value to be moved in member timestamp
 */
void HandMessage::timestamp(
        std::string&& _timestamp)
{
    m_timestamp = std::move(_timestamp);
}

/*!
 * @brief This function returns a constant reference to member timestamp
 * @return Constant reference to member timestamp
 */
const std::string& HandMessage::timestamp() const
{
    return m_timestamp;
}

/*!
 * @brief This function returns a reference to member timestamp
 * @return Reference to member timestamp
 */
std::string& HandMessage::timestamp()
{
    return m_timestamp;
}


/*!
 * @brief This function copies the value in member det_valid
 * @param _det_valid New value to be copied in member det_valid
 */
void HandMessage::det_valid(
        const std::array<uint8_t, 2>& _det_valid)
{
    m_det_valid = _det_valid;
}

/*!
 * @brief This function moves the value in member det_valid
 * @param _det_valid New value to be moved in member det_valid
 */
void HandMessage::det_valid(
        std::array<uint8_t, 2>&& _det_valid)
{
    m_det_valid = std::move(_det_valid);
}

/*!
 * @brief This function returns a constant reference to member det_valid
 * @return Constant reference to member det_valid
 */
const std::array<uint8_t, 2>& HandMessage::det_valid() const
{
    return m_det_valid;
}

/*!
 * @brief This function returns a reference to member det_valid
 * @return Reference to member det_valid
 */
std::array<uint8_t, 2>& HandMessage::det_valid()
{
    return m_det_valid;
}


/*!
 * @brief This function copies the value in member warning
 * @param _warning New value to be copied in member warning
 */
void HandMessage::warning(
        const std::array<uint8_t, 2>& _warning)
{
    m_warning = _warning;
}

/*!
 * @brief This function moves the value in member warning
 * @param _warning New value to be moved in member warning
 */
void HandMessage::warning(
        std::array<uint8_t, 2>&& _warning)
{
    m_warning = std::move(_warning);
}

/*!
 * @brief This function returns a constant reference to member warning
 * @return Constant reference to member warning
 */
const std::array<uint8_t, 2>& HandMessage::warning() const
{
    return m_warning;
}

/*!
 * @brief This function returns a reference to member warning
 * @return Reference to member warning
 */
std::array<uint8_t, 2>& HandMessage::warning()
{
    return m_warning;
}


/*!
 * @brief This function copies the value in member joints_l
 * @param _joints_l New value to be copied in member joints_l
 */
void HandMessage::joints_l(
        const std::array<std::array<float, 3>, 21>& _joints_l)
{
    m_joints_l = _joints_l;
}

/*!
 * @brief This function moves the value in member joints_l
 * @param _joints_l New value to be moved in member joints_l
 */
void HandMessage::joints_l(
        std::array<std::array<float, 3>, 21>&& _joints_l)
{
    m_joints_l = std::move(_joints_l);
}

/*!
 * @brief This function returns a constant reference to member joints_l
 * @return Constant reference to member joints_l
 */
const std::array<std::array<float, 3>, 21>& HandMessage::joints_l() const
{
    return m_joints_l;
}

/*!
 * @brief This function returns a reference to member joints_l
 * @return Reference to member joints_l
 */
std::array<std::array<float, 3>, 21>& HandMessage::joints_l()
{
    return m_joints_l;
}


/*!
 * @brief This function copies the value in member joints3d_l
 * @param _joints3d_l New value to be copied in member joints3d_l
 */
void HandMessage::joints3d_l(
        const std::array<std::array<float, 3>, 21>& _joints3d_l)
{
    m_joints3d_l = _joints3d_l;
}

/*!
 * @brief This function moves the value in member joints3d_l
 * @param _joints3d_l New value to be moved in member joints3d_l
 */
void HandMessage::joints3d_l(
        std::array<std::array<float, 3>, 21>&& _joints3d_l)
{
    m_joints3d_l = std::move(_joints3d_l);
}

/*!
 * @brief This function returns a constant reference to member joints3d_l
 * @return Constant reference to member joints3d_l
 */
const std::array<std::array<float, 3>, 21>& HandMessage::joints3d_l() const
{
    return m_joints3d_l;
}

/*!
 * @brief This function returns a reference to member joints3d_l
 * @return Reference to member joints3d_l
 */
std::array<std::array<float, 3>, 21>& HandMessage::joints3d_l()
{
    return m_joints3d_l;
}


/*!
 * @brief This function copies the value in member verts3d_l
 * @param _verts3d_l New value to be copied in member verts3d_l
 */
void HandMessage::verts3d_l(
        const std::array<std::array<float, 3>, 778>& _verts3d_l)
{
    m_verts3d_l = _verts3d_l;
}

/*!
 * @brief This function moves the value in member verts3d_l
 * @param _verts3d_l New value to be moved in member verts3d_l
 */
void HandMessage::verts3d_l(
        std::array<std::array<float, 3>, 778>&& _verts3d_l)
{
    m_verts3d_l = std::move(_verts3d_l);
}

/*!
 * @brief This function returns a constant reference to member verts3d_l
 * @return Constant reference to member verts3d_l
 */
const std::array<std::array<float, 3>, 778>& HandMessage::verts3d_l() const
{
    return m_verts3d_l;
}

/*!
 * @brief This function returns a reference to member verts3d_l
 * @return Reference to member verts3d_l
 */
std::array<std::array<float, 3>, 778>& HandMessage::verts3d_l()
{
    return m_verts3d_l;
}


/*!
 * @brief This function copies the value in member joints_r
 * @param _joints_r New value to be copied in member joints_r
 */
void HandMessage::joints_r(
        const std::array<std::array<float, 3>, 21>& _joints_r)
{
    m_joints_r = _joints_r;
}

/*!
 * @brief This function moves the value in member joints_r
 * @param _joints_r New value to be moved in member joints_r
 */
void HandMessage::joints_r(
        std::array<std::array<float, 3>, 21>&& _joints_r)
{
    m_joints_r = std::move(_joints_r);
}

/*!
 * @brief This function returns a constant reference to member joints_r
 * @return Constant reference to member joints_r
 */
const std::array<std::array<float, 3>, 21>& HandMessage::joints_r() const
{
    return m_joints_r;
}

/*!
 * @brief This function returns a reference to member joints_r
 * @return Reference to member joints_r
 */
std::array<std::array<float, 3>, 21>& HandMessage::joints_r()
{
    return m_joints_r;
}


/*!
 * @brief This function copies the value in member joints3d_r
 * @param _joints3d_r New value to be copied in member joints3d_r
 */
void HandMessage::joints3d_r(
        const std::array<std::array<float, 3>, 21>& _joints3d_r)
{
    m_joints3d_r = _joints3d_r;
}

/*!
 * @brief This function moves the value in member joints3d_r
 * @param _joints3d_r New value to be moved in member joints3d_r
 */
void HandMessage::joints3d_r(
        std::array<std::array<float, 3>, 21>&& _joints3d_r)
{
    m_joints3d_r = std::move(_joints3d_r);
}

/*!
 * @brief This function returns a constant reference to member joints3d_r
 * @return Constant reference to member joints3d_r
 */
const std::array<std::array<float, 3>, 21>& HandMessage::joints3d_r() const
{
    return m_joints3d_r;
}

/*!
 * @brief This function returns a reference to member joints3d_r
 * @return Reference to member joints3d_r
 */
std::array<std::array<float, 3>, 21>& HandMessage::joints3d_r()
{
    return m_joints3d_r;
}


/*!
 * @brief This function copies the value in member verts3d_r
 * @param _verts3d_r New value to be copied in member verts3d_r
 */
void HandMessage::verts3d_r(
        const std::array<std::array<float, 3>, 778>& _verts3d_r)
{
    m_verts3d_r = _verts3d_r;
}

/*!
 * @brief This function moves the value in member verts3d_r
 * @param _verts3d_r New value to be moved in member verts3d_r
 */
void HandMessage::verts3d_r(
        std::array<std::array<float, 3>, 778>&& _verts3d_r)
{
    m_verts3d_r = std::move(_verts3d_r);
}

/*!
 * @brief This function returns a constant reference to member verts3d_r
 * @return Constant reference to member verts3d_r
 */
const std::array<std::array<float, 3>, 778>& HandMessage::verts3d_r() const
{
    return m_verts3d_r;
}

/*!
 * @brief This function returns a reference to member verts3d_r
 * @return Reference to member verts3d_r
 */
std::array<std::array<float, 3>, 778>& HandMessage::verts3d_r()
{
    return m_verts3d_r;
}


// Include auxiliary functions like for serializing/deserializing.
#include "HandMessageCdrAux.ipp"

